From: Richard M. Stallman Date: Sat, 22 May 2004 22:17:17 +0000 (+0000) Subject: (Fread_file_name): Expand DIR if not absolute. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~22335 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=811c08dfce0b201d509ba5ba837016d04f3eaf4f;p=emacs.git (Fread_file_name): Expand DIR if not absolute. --- diff --git a/src/fileio.c b/src/fileio.c index 8696946eb8a..5c073433c75 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -6198,10 +6198,13 @@ provides a file dialog box. */) if (NILP (dir)) dir = current_buffer->directory; + if (NILP (Ffile_name_absolute_p (dir))) + dir = Fexpand_file_name (dir, Qnil); if (NILP (default_filename)) - default_filename = !NILP (initial) - ? Fexpand_file_name (initial, dir) - : current_buffer->filename; + default_filename + = (!NILP (initial) + ? Fexpand_file_name (initial, dir) + : current_buffer->filename); /* If dir starts with user's homedir, change that to ~. */ homedir = (char *) egetenv ("HOME");